﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                     xmlns:SF_Comp="clr-namespace:ScrumFactory.Composition;assembly=ScrumFactory.Composition" 
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">


    <DataTemplate x:Key="StatusItemDataTemplate">
        <StackPanel Orientation="Horizontal">
            <Image DataContext="{Binding}" Style="{StaticResource BacklogItemStatusImage}" Width="20" Height="20" Stretch="Uniform" />
            <TextBlock Margin="5,0,0,0" Text="{Binding ., Converter={StaticResource LocalizeConverter}}"/>
        </StackPanel>
    </DataTemplate>

    <DataTemplate x:Key="StatusItemShortDataTemplate">        
            <Image  DataContext="{Binding}" Style="{StaticResource BacklogItemStatusImage}" Width="20" Height="20" Stretch="Uniform" />        
    </DataTemplate>

    <DataTemplate x:Key="MemberDataTemplate">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="30"/>
            </Grid.ColumnDefinitions>
            <ContentControl                        
                        DataContext="{Binding MemberProfile}"
                        Grid.Column="0"
                        Margin="0,3,20,3"
                        HorizontalAlignment="Center" VerticalAlignment="Center"
                        Style="{StaticResource MemberImageControlStyle}"/>
            <StackPanel Grid.Column="1">
                <TextBlock Text="{Binding MemberProfile.FullName}" TextTrimming="CharacterEllipsis" Style="{StaticResource ItemTitleTextBlock}"/>
                <TextBlock Text="{Binding MemberProfile.CompanyName}" Foreground="{StaticResource AlertBrush}" FontSize="{StaticResource NormalFontSize}" TextWrapping="Wrap" TextTrimming="CharacterEllipsis">
                        <TextBlock.Style>
                            <Style>
                                <Setter Property="TextBlock.Visibility" Value="Collapsed"/>
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding IsContactMember}" Value="True">
                                        <Setter Property="TextBlock.Visibility" Value="Visible"/>
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </TextBlock.Style>
                </TextBlock>                
                <TextBlock Text="{Binding MemberProfile.Skills}" Foreground="{StaticResource SubTextBrush}" TextWrapping="Wrap" TextTrimming="CharacterEllipsis"/>
            </StackPanel>
            <Path                  
                    Grid.Column="2"
                    StrokeLineJoin="Round" SnapsToDevicePixels="True"
                    DataContext="{Binding MemberProfile.DayOccupation}"
                    Style="{StaticResource DayAllocationPath}"/>
        </Grid>
    </DataTemplate>



</ResourceDictionary>